<?php
    require('/connect.php');
    $bid=$_POST['bid'];
    $query="INSERT INTO choices (sid, rid) VALUES ('$id','$bid');";
    mysqli_commit($query);

    // Set autocommit to off
    mysqli_autocommit($con,FALSE);

    // Insert some values 
    mysqli_query($con,$query);

    // Commit transaction
    mysqli_commit($con);

    // Close connection
    mysqli_close($con);
?>
